from django.contrib.auth.models import User
from django.db import models


# Create your models here.

class Client(models.Model):
    user = models.OneToOneField(User, related_name='client', on_delete=models.CASCADE)
    channel_name = models.CharField(max_length=300, default="")


class Note(models.Model):
    time = models.CharField(max_length=300, default="")
    msg = models.CharField(max_length=300, default="")
    from_name = models.CharField(max_length=300, default="")
    from_id = models.IntegerField()
    to_id = models.IntegerField()


class Friend(models.Model):
    user1 = models.ForeignKey(User, related_name="user1", on_delete=models.CASCADE)
    user2 = models.ForeignKey(User, related_name="user2",  on_delete=models.CASCADE)
    status = models.IntegerField()